<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
#scrollLeftRtl {
  width: 100px;
  height: 100px;
  background-color: green;
  direction: rtl;
  overflow: scroll;
}

#inner {
  white-space: nowrap;
}
</style>

<div id="scrollLeftRtl">
  <span id="inner">INNER INNER INNER</span>
</div>

<script>
  description("Check that the scroll offset in an LTR block is correctly preserved when the existence of its vertical scrollbar changes.");

  var scrollLeftDiv = document.getElementById("scrollLeftRtl");
  var initialOffset = scrollLeftDiv.scrollLeft;
  scrollLeftDiv.style.overflow = "auto";
  var finalOffset = scrollLeftDiv.scrollLeft;
  shouldBe("finalOffset", "initialOffset");
</script>
